﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SW.EF.Core
{
    /// <summary>
    /// 加密解密
    /// </summary>
    public class Encrypt
    {
        #region MD5加密

        /// <summary>
        /// MD5加密算法
        /// </summary>
        /// <param name="str">待加密的字符串</param>
        /// <returns></returns>
        public static string Md5(string str)
        {
            return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(str, "MD5").ToLower();
        }

        #endregion
    }
}
